﻿/*
**  AABB类
*/
if (!$.Engine.Collision || typeof $.Engine.Collision === "undefined") $.Engine.Collision = {};
$.Engine.Collision.AABB = function (minX, minY, maxX, maxY) {
  this.minVertex = new $.Engine.Math.Vector2D(minX, minY);
  this.maxVertex = new $.Engine.Math.Vector2D(maxX, maxY);
};
Object.extend($.Engine.Collision.AABB.prototype, {
  IsValid: function () {
    return this.minVertex.IsValid() && this.maxVertex.IsValid() && (this.maxVertex.x - this.minVertex.x >= 0.0) && (this.maxVertex.x - this.minVertex.x >= 0.0);
  }
});
